<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="webwork" prefix="s"%>
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
window.count = 3;
window.onload = function(){
	if(window.opener){
		var sn = "<s:property value="#parameters._sn" />";
		var sv = "<s:property value="#parameters._sv" />";
		var sv2 = "<s:property value="#attr._sv2" />";
		var n = window.opener.document.getElementsByName(sn);
		if(n != null)
			n[0].value = sv;
		n2 = window.opener.document.getElementById(sn + ".show");
		if(n2 != null)
			n2.innerHTML = sv2;
		document.getElementById("s").innerText = "成功";
	}else{
		document.getElementById("s").innerText = "完毕";
	}
	window.close();
	//window.setTimeout("clock()", 1000);
}

function clock(){
	window.count--;
	document.getElementById("t").innerHTML = window.count;
	if(window.count < 1)
		window.close();
	window.setTimeout("clock()", 1000);
}
</script>
</head>
<body>
操作<span id="s"></span>，<span id="t">3</span> 秒后将关闭该窗口
</body>
</html>